import request from "@/utils/request";
import { exportFileByUrl, GetParams } from "@/utils/common.js";

// 查询
export function GetBondInfoApi(params) {
  return request({
    url: "hermes/bond/bondInfo",
    method: "get",
    params,
  });
}
// 新增
export function AddBondInfoApi(data) {
  return request({
    url: "hermes/bond/bondInfo",
    method: "post",
    data,
  });
}
// 编辑
export function UpdateBondInfoApi(data) {
  return request({
    url: "hermes/bond/bondInfo",
    method: "put",
    data,
  });
}
// 删除
export function DeleteBondInfoApi(params) {
  return request({
    url: `hermes/bond/bondInfo/${params.bondId}`,
    method: "delete",
    params,
  });
}

// 风险评估
export function RiskAssessment(params) {
  return request({
    url: `hermes/bond/riskAssessment/${params.bondId}`,
    method: "get",
    params,
  });
}
// 债券评级信息
export function BondRatingInformation(params) {
  return request({
    url: `hermes/bond/bondRatingInformation/${params.bondId}`,
    method: "get",
  });
}
// 债券详细信息
export function BondDetails(params) {
  return request({
    url: `hermes/bond/bondDetails/${params.bondId}`,
    method: "get",
  });
}
// 估值信息
export function ValuationInformation(params) {
  return request({
    url: `hermes/bond/valuationInformation/${params.bondId}`,
    method: "get",
  });
}
// 查询挂钩曲线
export function HookCurve(params) {
  return request({
    url: `hermes/bond/riskAssessment/hookCurve/${params.bondId}`,
    method: "get",
  });
}
